<?php

//print_r($_POST);
 
// username and password sent from form 


print_r($_POST);


//return;

$scan_code=$_POST['scan_code'];
$designer=$_POST['designer'];
$name=$_POST['name'];
$active=$_POST['active'];
$price=$_POST['price'];
$ratio=$_POST['ratio'];

    if(!isItemExist($scan_code)){
    	
    	header("location:../index.php?page=manage_items&stat=error&error=notExist");
    }else{
    	//...do add new item
    	if(alterItem($scan_code,$designer,$name,$active,$price,$ratio)){
    		
		
    	header("location:../index.php?page=manage_items&stat=altered");
			
    	}else{
    	
    		
    	header("location:../index.php?page=manage_items&stat=error&error=badData");
			
    	}
    
    	//header("location:../index.php?page=stack&id=".$Orid."&error=checkfail");
		
    }

  return ;

?>